package com.shujia.util

import org.apache.spark.sql.SparkSession

object SparkTool {
  def getSparkSession: SparkSession = {
    //创建spark 环境
    val spark: SparkSession = SparkSession
      .builder()
      .appName("spark")
      .enableHiveSupport() //开启hive的元数据支持
      .getOrCreate()

    spark
  }
}
